package com.hnchances.config;

import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableKnife4j
public class Knife4jConfig {

    @Bean
    public OpenAPI openAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("学生管理系统")// 标题
                        .version("1.0")// 版本
                        .termsOfService("httt://127.0.0.1:8080")//API服务条款
                        .contact(new Contact().name("Hang").email("邮箱").url("网址"))// 作者信息
                        .description("一款基于SpringSecurity鉴权的学生管理系统"));// 介绍
    }
}